<%--
  Created by IntelliJ IDEA.
  User: 余沣
  Date: 2021/6/21
  Time: 10:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="/css/nav.css">
<div class="container-fluid">
    <div class="row">
        <nav class="navbar navbar-inverse" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse"
                            data-target="#example-navbar-collapse">
                    <span class="sr-only">切换导航</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">八一铁路12345</a>
            </div>
            <div class="collapse navbar-collapse" id="example-navbar-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <form class="navbar-form navbar-left" role="search">
                            <div class="input-group">
                                <input value="${train_num}" type="text" id="search_input" class="form-control">
                                <span class="input-group-btn">
                        <button class="btn btn-default" type="button" onclick="search_name()">search</button>
                    </span>
                            </div>
                        </form>
                    </li>
                    <li class="active"><a href="/product/index">首页</a></li>
                    <li><a href="#">${user.username}</a></li>
                    <li><a href="/user/index">登录</a></li>
                    <li><a href="#" data-toggle="modal" data-target="#myModal">注册</a></li>

                    <li><div class="dropdown">
                        <button type="button" class="btn dropdown-toggle" id="dropdownMenu5" data-toggle="dropdown">车票信息
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu5">
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" href="/railticket/index">车票购买</a>
                            </li>
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" href="/train/index">订单查询</a>
                            </li>
                        </ul>
                    </div></li>
                    <li><div class="dropdown">
                        <button type="button" class="btn dropdown-toggle" id="dropdownMenu6" data-toggle="dropdown">商旅服务
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu6">
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" href="/shangpin/index">商品</a>
                            </li>
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" href="/cart/index">商品订单</a>
                            </li>
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" href="/product/index">旅游系统</a>
                            </li>
                            <c:if test="${user!=null}">
                                <li><a href="/user/exit">安全退出</a></li>
                            </c:if>
                        </ul>
                    </div></li>
                    <li><img class="nav_img" src="/imgs/loading3.gif"></li>
                </ul>
            </div>
            </div>
        </nav>
    </div>
</div>
<%--    导航end--%>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="tripAddModalLabel">用户注册</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">用户ID</label>
                        <div class="col-sm-10">
                            <input type="text" name="orginLocation" class="form-control" id="orginLocation_add_input" placeholder="id">
                            <span class="help-block"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">用户名</label>
                        <div class="col-sm-10">
                            <input type="text" name="destinationLocation" class="form-control" id="destinationLocation_add_input" placeholder="用户名">
                            <span class="help-block"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">密码</label>
                        <div class="col-sm-10">
                            <input type="text" name="startTime" class="form-control" id="startTime_add_input" placeholder="密码">
                            <span class="help-block"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">邮件</label>
                        <div class="col-sm-10">
                            <input type="text" name="reachTime" class="form-control" id="reachTime_add_input" placeholder="email">
                            <span class="help-block"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">年龄</label>
                        <div class="col-sm-10">
                            <input type="number" name="spanDays" class="form-control" id="spanDays_add_input" placeholder="age">
                            <span class="help-block"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">管理身份</label>
                        <div class="col-sm-10">
                            <input type="text" name="carNum" class="form-control" id="carNum_add_input" placeholder="power">
                            <span  class="help-block"></span>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default">关闭</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal">注册</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<script>
    $(function() {
        $('#myModal').modal('hide')
    });
</script>
<script>
    $(function() {
        $('#myModal').on('hide.bs.modal',
            function() {
                alert('注册成功');
            })
    });
</script>

